<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="from"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title><spring:message code="login_page_title"/> </title>

<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resources/easyui/themes/default/easyui.css" />
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resources/easyui/themes/icon.css" />
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/easyui/jquery-1.8.3.min.js" ></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=request.getContextPath() %>/resources/easyui/locale/easyui-lang-zh_CN.js"></script>
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/resources/style/main.css">
    <style type="text/css">
        .STYLE4 {font-size: 15px;font-family: Times New Roman;}
        .logtitle {font-size: 18px;font-family: 黑体;}
        .logcon {font-size: 14px;font-family: 黑体;}
        .STYLE5 {font-size: 24px; font-family: 黑体; }
        .STYLE7 {font-family: 黑体; color: #000000; }
        .STYLE8 {
            font-family: 黑体;
        }
        #bg_td{
            background-image:url('<%=request.getContextPath() %>/resources/images/u1.jpg');
            background-position: center center;
            background-repeat: no-repeat;
            filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#FFFFFF',EndColorStr='#000000');
        }
        #logp{
            background:rgba(230,240,255,0.6);
            border-radius: 10px;
        }
    </style>
</head>
<body>
<table width=100% border="0" cellpadding="0" cellspacing="0">
    <tr>
        <td width=13% height="50" valign="top">&nbsp;</td>
        <td width=5% valign="top"><img src="<%=request.getContextPath() %>/resources/images/u7.png" width="63" height="63" /></td>
        <td width=20% valign="top">
            <div align="justify" >
                <!--<p class="STYLE8"><spring:message code="system_name"/><br />
                    <spring:message code="system_name_english"/> </p>//-->
                    <img src="<%=request.getContextPath() %>/resources/images/loginlogo.png" width="353" height="60"/>
            </div></td>
        <td width=50% valign="bottom" align="right">
        <!--<p class="STYLE5"><spring:message code="platform_name"/> </p>//-->
        <img src="<%=request.getContextPath() %>/resources/images/loginslogan.png" width="637" height="70"/>
        </td>
        <!--<td width=20% valign="middle" class="STYLE4">
            <div align="justify" >
                <a href="www.baidu.com" class="STYLE7"> <spring:message code="download_link"/> </a>
                <a href="www.baidu.com" class="STYLE7"><spring:message code="question_feedback"/></a>    </div>   </td>
                data-options="style:{position:'absolute',left:750,top:200}"//-->
    </tr>
    <tr>     
        <td  id="bg_td" width="100%" height="600" colspan="5"  class="STYLE4"  valign="middle" align="center">
            <div id="logp" class="easyui-panel" border="false" style="width: 330px" align="center" valign="middle">
                <div style="padding:10px 30px 20px 30px" align="center" valign="middle">
                    <form id="loginform" method="post" action="<%=request.getContextPath() %>/login">
                        <table cellpadding="5">
                           <tr >
                               <td class="logtitle" colspan="1" align="center"><B><spring:message code="login_title" /> </B></td>
                            </tr>
                            <tr>
                                <td class="logcon" align="center"><input type="text" name="userName" class="easyui-validatebox" required="true" align="center"/>
                                </td>
                            </tr>
                            <tr>
                                <td class="logcon" align="center" ><input type="password" name="password" class="easyui-validatebox" required="true" align="center"/></td>
                            </tr>
                        </table>
                    </form>
                    <div class="logcon" style="text-align:center;padding:10px;">
                        <a href="javascript:void(0)" class="easyui-linkbutton" id="mouse" onclick="login()"><B><spring:message code="submit"/> </B></a>
                    </div>
                </div>
            </div>
        </td>
    </tr>
    <tr>
        <td  height="25" colspan="5" valign="top" class="STYLE4"><div align="center"><span id="cache40"><spring:message code="copyright"/> </span><span id="cache41">. </span><span id="cache42"><spring:message code="right_reserve"/> </span><span id="cache43">.</span></div></td>
    </tr>
</table>
<script type="text/javascript">
//回车键登录
$(function(){ 
	$(document).keydown(function(event){ 
	if(event.keyCode==13){ 
	$("#mouse").click(); 
	} 
	}); 
});

function login() {	
	$('#loginform').form('submit', {
		url: '<%=request.getContextPath() %>/login',
		onSubmit: function(){
			return $(this).form('validate');
		},
		success: function(result){
			result = eval('(' + result + ')');

			if (result.successful) {
				window.location.href="<%=request.getContextPath() %>";	
			} else {
				$.messager.show({title: '操作结果',msg: "账号或密码信息有误！"});
			}
		}
	});
}
</script>
</body>
</html>